package com.von.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.von.service.IRoleService;
import com.von.vo.RoleVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @author absorprofess
 */
@RestController
@RequestMapping("/role")
public class RoleController {

    @Autowired
    private IRoleService iRoleService;

    @GetMapping("/getAll")
    public R<List<Map>> getAll() {
        return iRoleService.getAll();
    }

    @PostMapping("/update")
    public R<String> reset(@RequestBody RoleVo roleVo) {
        return iRoleService.update(roleVo);
    }
}
